package com.java.demo.service;

import com.java.demo.model.User;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@Service
public class UserService2 {
   @Resource(name="user2")
    private User user;

    public void sayHi(){
        System.out.println(user.toString());
    }
}
